import {get,post} from "./http"

// 配使用的接口
export const findAllCarouselApi= p => get('/index/carousel/findAll', p);
// http://119.91.255.208:8888/article/pageQuery?page=1&pageSize=5

export const getArticleApi = (p) => get("/index/article/pageQuery?" + "page=" + p.page + "&pageSize=" + p.pageSize)

// GET /index/project/pageQuery
export const getProjectApi = (p) => get("/index/project/pageQuery?" + "page=" + p.page + "&pageSize=" + p.pageSize)

export const saveApply = (p) => post("/message/insert?userId="+p.userId +"&status=" + p.status +"&message=" + p.message + "&fansId=" + p.fansId)

export const queryMessage = (p) => get("/message/queryMessage?userId="+p.userId)

export const loginApi = (p) => post("/user/login",p)
// GET GET /message/deleteById
export const deleteMessgeApi = (p) => get("/message/deleteById?id="+p.id)

export const getUSerInfo = (p) => get("/user/info?token="+p.token)
// POST /user/register
export const registerApi = (p) => post("/user/register?username="+p.username + "&password=" + p.passsword + "&realname=" + p.realName)
